namespace Movies.Data.Migrations
{
    using System.Data.Entity.Migrations;

    internal sealed class Configuration : DbMigrationsConfiguration<Movies.Data.ApplicationDbContext>
    {
        public Configuration()
        {
            AutomaticMigrationsEnabled = false;
        }

        protected override void Seed(Movies.Data.ApplicationDbContext context)
        {
            context.Movies.AddOrUpdate(
                p => new { p.Title, p.Image },
                new Movies.DataModels.Movie() { Title = "HTC", Image = "7142323232" },
                new Movies.DataModels.Movie() { Title = "Hacker", Image = "7149111234" },
                new Movies.DataModels.Movie() { Title = "Bob Jones", Image = "9097146789" }
                );
            //  This method will be called after migrating to the latest version.

            //  You can use the DbSet<T>.AddOrUpdate() helper extension method 
            //  to avoid creating duplicate seed data. E.g.
            //
            //    context.People.AddOrUpdate(
            //      p => p.FullName,
            //      new Person { FullName = "Andrew Peters" },
            //      new Person { FullName = "Brice Lambson" },
            //      new Person { FullName = "Rowan Miller" }
            //    );
            //
        }
    }
}
